<?php
namespace Common\Models;
use Common\BaseModel;
class JdCategory  extends BaseModel
{
	public $res;
	public $redis_key="";
    public function initialize()
    {
        parent::initialize();
        $this->setSource('f_jd_categorys');
    }

    public function get_all(){
        $condition["conditions"]="is_def =1";
        $condition["columns"]="name, cid1 as category_id,site";
        $res=$this->find($condition)->toarray();
        return $res;
    }


    public function category(){
        $condition["conditions"]="is_def =1";
        $condition["columns"]="name,cid1 as category_id,site,image";
        $res=$this->find($condition)->toarray();
        return $res;
    }


}
